import requests
from config import url, headers_web


class CourseStructure:

    def __int__(self):
        self.url = url
        self.headers = headers_web

    @classmethod
    def post_generate_course_knowledge_structure(cls, url: str, params, headers, json):
        """
        @Summary:根据课程知识结构生成教学内容
        @Description:云课堂老师端-课程建设使用
        :param url:
        :param paramas:{
                        "courseId":"",
                        "userId":"",
                        "userName":"",
                        "validCode":"",
                        "versionId":""}
        :param headers:
        :param json:{}
        :return:
        """
        url = url + "/courseApi/v1/coursestructure/generatebycourseknowledgestructure"
        r = requests.post(url=url,headers=headers,params=params,json=json)

        return r